From: Giovanni Campagna Date: Mon, 19 Aug 2013 22:48:56 +0000 (+0200) Subject: Background: allow passing the settings schema from outside X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3674 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4413f816e6016e3759e7e0b2d8188ee62aa1ab6a;p=gnome-shell.git Background: allow passing the settings schema from outside This way it is possible to use different settings for different backgrounds. https://bugzilla.gnome.org/show_bug.cgi?id=688210 --- diff --git a/js/ui/background.js b/js/ui/background.js index 1d9ab7c21..246060a88 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -295,14 +295,15 @@ const Background = new Lang.Class({ _init: function(params) { params = Params.parse(params, { monitorIndex: 0, layoutManager: Main.layoutManager, - effects: Meta.BackgroundEffects.NONE }); + effects: Meta.BackgroundEffects.NONE, + settings: null }); this.actor = new Meta.BackgroundGroup(); this.actor._delegate = this; this._destroySignalId = this.actor.connect('destroy', Lang.bind(this, this._destroy)); - this._settings = new Gio.Settings({ schema: BACKGROUND_SCHEMA }); + this._settings = params.settings; this._monitorIndex = params.monitorIndex; this._layoutManager = params.layoutManager; this._effects = params.effects; @@ -716,8 +717,10 @@ const BackgroundManager = new Lang.Class({ layoutManager: Main.layoutManager, monitorIndex: null, effects: Meta.BackgroundEffects.NONE, - controlPosition: true }); + controlPosition: true, + settingsSchema: BACKGROUND_SCHEMA }); + this._settings = new Gio.Settings({ schema: params.settingsSchema }); this._container = params.container; this._layoutManager = params.layoutManager; this._effects = params.effects; @@ -776,7 +779,8 @@ const BackgroundManager = new Lang.Class({ _createBackground: function() { let background = new Background({ monitorIndex: this._monitorIndex, layoutManager: this._layoutManager, - effects: this._effects }); + effects: this._effects, + settings: this._settings }); this._container.add_child(background.actor); let monitor = this._layoutManager.monitors[this._monitorIndex];